package com.example.service.impl;

import com.example.dao.WeightRecordDao;
import com.example.entity.WeightRecord;
import com.example.service.WeightRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class WeightRecordServiceImpl implements WeightRecordService {

    @Autowired
    private WeightRecordDao weightRecordDao;

    @Override
    public List<WeightRecord> getAllWeightRecords() {
        return weightRecordDao.getAllWeightRecords();
    }

    @Override
    public WeightRecord getWeightRecordById(Integer id) {
        return weightRecordDao.getWeightRecordById(id);
    }

    @Override
    public int addWeightRecord(WeightRecord record) {
        return weightRecordDao.addWeightRecord(record);
    }

    @Override
    public int updateWeightRecord(WeightRecord record) {
        return weightRecordDao.updateWeightRecord(record);
    }

    @Override
    public int deleteWeightRecord(Integer id) {
        return weightRecordDao.deleteWeightRecord(id);
    }
}